<template>
	<div>Slots</div>
	<slot />
	<slot name="header" />
	<slot name="footer" msg="插槽数据传递" />
</template>

<script>
import { defineComponent } from "vue";

export default defineComponent({
	name: "Slots",
});
</script>

<script setup>
// vuex的使用
import { useStore } from "vuex";
import store from "../../store";
const stort = useStore();

// 触发mutations
store.commit("CHANGEMSG", "修改store");

// 获取stort对象上的任意数据
console.log(stort.state.msg);
</script>
